home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / CodeWarrior Lite / Metrowerks C⁄C++ Lite / Headers / Universal Headers 2.0.1f / PPCToolbox.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-03-22  |  16.6 KB  |  528 lines  |  [TEXT/MMCC]

  1. /*
  2.      File:        PPCToolbox.h
  3.  
  4.      Contains:    Program-Program Communications Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    System 7.5
  7.                  Package:    Universal Interfaces 2.0 in “MPW Latest” on ETO #17
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __PPCTOOLBOX__
  21. #define __PPCTOOLBOX__
  22.  
  23.  
  24. #ifndef __APPLETALK__
  25. #include <AppleTalk.h>
  26. #endif
  27. /*    #include <Types.h>                                            */
  28. /*        #include <ConditionalMacros.h>                            */
  29. /*    #include <OSUtils.h>                                        */
  30. /*        #include <MixedMode.h>                                    */
  31. /*        #include <Memory.h>                                        */
  32.  
  33. #ifndef __MEMORY__
  34. #include <Memory.h>
  35. #endif
  36.  
  37. #ifndef __TYPES__
  38. #include <Types.h>
  39. #endif
  40.  
  41. #ifdef __cplusplus
  42. extern "C" {
  43. #endif
  44.  
  45. #if PRAGMA_ALIGN_SUPPORTED
  46. #pragma options align=mac68k
  47. #endif
  48.  
  49. #if PRAGMA_IMPORT_SUPPORTED
  50. #pragma import on
  51. #endif
  52.  
  53. typedef unsigned char PPCServiceType;
  54.  
  55.  
  56. enum {
  57.     ppcServiceRealTime            = 1
  58. };
  59.  
  60. typedef short PPCLocationKind;
  61.  
  62.  
  63. enum {
  64.     ppcNoLocation                = 0,                            /* There is no PPCLocName */
  65.     ppcNBPLocation                = 1,                            /* Use AppleTalk NBP      */
  66.     ppcNBPTypeLocation            = 2                                /* Used for specifying a location name type during PPCOpen only */
  67. };
  68.  
  69. typedef short PPCPortKinds;
  70.  
  71.  
  72. enum {
  73.     ppcByCreatorAndType            = 1,                            /* Port type is specified as colloquial Mac creator and type */
  74.     ppcByString                    = 2                                /* Port type is in pascal string format */
  75. };
  76.  
  77. /* Values returned for request field in PPCInform call */
  78. typedef unsigned char PPCSessionOrigin;
  79.  
  80.  
  81. enum {
  82. /* Values returned for requestType field in PPCInform call */
  83.     ppcLocalOrigin                = 1,                            /* session originated from this machine */
  84.     ppcRemoteOrigin                = 2                                /* session originated from remote machine */
  85. };
  86.  
  87. typedef short PPCPortRefNum;
  88.  
  89. typedef long PPCSessRefNum;
  90.  
  91. struct PPCPortRec {
  92.     ScriptCode                        nameScript;                    /* script of name */
  93.     Str32                            name;                        /* name of port as seen in browser */
  94.     PPCPortKinds                    portKindSelector;            /* which variant */
  95.     union {
  96.         Str32                            portTypeStr;            /* pascal type string */
  97.         struct {
  98.             OSType                            portCreator;
  99.             OSType                            portType;
  100.         }                                port;
  101.     } u;
  102. };
  103.  
  104. typedef struct PPCPortRec PPCPortRec, *PPCPortPtr;
  105.  
  106. struct LocationNameRec {
  107.     PPCLocationKind                    locationKindSelector;        /* which variant */
  108.     union {
  109.         EntityName                        nbpEntity;                /* NBP name entity */
  110.         Str32                            nbpType;                /* just the NBP type string, for PPCOpen */
  111.     } u;
  112. };
  113.  
  114. typedef struct LocationNameRec LocationNameRec, *LocationNamePtr;
  115.  
  116. struct PortInfoRec {
  117.     unsigned char                    filler1;
  118.     Boolean                            authRequired;
  119.     PPCPortRec                        name;
  120. };
  121. typedef struct PortInfoRec PortInfoRec, *PortInfoPtr;
  122.  
  123. typedef PortInfoRec *PortInfoArrayPtr;
  124.  
  125. typedef union PPCParamBlockRec PPCParamBlockRec, *PPCParamBlockPtr;
  126.  
  127. typedef pascal void (*PPCCompProcPtr)(PPCParamBlockPtr pb);
  128.  
  129. #if GENERATINGCFM
  130. typedef UniversalProcPtr PPCCompUPP;
  131. #else
  132. typedef PPCCompProcPtr PPCCompUPP;
  133. #endif
  134.  
  135. #define PPCHeader                 \
  136.     Ptr qLink;                     \
  137.     unsigned short csCode;         \
  138.     unsigned short intUse;         \
  139.     Ptr intUsePtr;                 \
  140.                                 \
  141.     PPCCompUPP ioCompletion;        \
  142.                                 \
  143.     OSErr ioResult;             \
  144.     unsigned long    Reserved[5];
  145. struct PPCOpenPBRec {
  146.     Ptr                                qLink;
  147.     unsigned short                    csCode;
  148.     unsigned short                    intUse;
  149.     Ptr                                intUsePtr;
  150.     PPCCompUPP                        ioCompletion;
  151.     OSErr                            ioResult;
  152.     unsigned long                    Reserved[5];
  153.     PPCPortRefNum                    portRefNum;                    /* 38 <--   Port Reference */
  154.     long                            filler1;
  155.     PPCServiceType                    serviceType;                /* 44 -->    Bit field describing the requested port service */
  156.     UInt8                            resFlag;                    /* Must be set to 0 */
  157.     PPCPortPtr                        portName;                    /* 46 -->   PortName for PPC */
  158.     LocationNamePtr                    locationName;                /* 50 -->   If NBP Registration is required */
  159.     Boolean                            networkVisible;                /* 54 -->   make this network visible on network */
  160.     Boolean                            nbpRegistered;                /* 55 <--   The given location name was registered on the network */
  161. };
  162. typedef struct PPCOpenPBRec PPCOpenPBRec, *PPCOpenPBPtr;
  163.  
  164. struct PPCInformPBRec {
  165.     Ptr                                qLink;
  166.     unsigned short                    csCode;
  167.     unsigned short                    intUse;
  168.     Ptr                                intUsePtr;
  169.     PPCCompUPP                        ioCompletion;
  170.     OSErr                            ioResult;
  171.     unsigned long                    Reserved[5];
  172.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  173.     PPCSessRefNum                    sessRefNum;                    /* 40 <--   Session Reference */
  174.     PPCServiceType                    serviceType;                /* 44 <--   Status Flags for type of session, local, remote */
  175.     Boolean                            autoAccept;                    /* 45 -->   if true session will be accepted automatically */
  176.     PPCPortPtr                        portName;                    /* 46 -->   Buffer for Source PPCPortRec */
  177.     LocationNamePtr                    locationName;                /* 50 -->   Buffer for Source LocationNameRec */
  178.     StringPtr                        userName;                    /* 54 -->   Buffer for Soure user's name trying to link. */
  179.     unsigned long                    userData;                    /* 58 <--   value included in PPCStart's userData */
  180.     PPCSessionOrigin                requestType;                /* 62 <--   Local or Network */
  181.     SInt8                            filler;
  182. };
  183. typedef struct PPCInformPBRec PPCInformPBRec, *PPCInformPBPtr;
  184.  
  185. struct PPCStartPBRec {
  186.     Ptr                                qLink;
  187.     unsigned short                    csCode;
  188.     unsigned short                    intUse;
  189.     Ptr                                intUsePtr;
  190.     PPCCompUPP                        ioCompletion;
  191.     OSErr                            ioResult;
  192.     unsigned long                    Reserved[5];
  193.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  194.     PPCSessRefNum                    sessRefNum;                    /* 40 <--   Session Reference */
  195.     PPCServiceType                    serviceType;                /* 44 <--   Actual service method (realTime) */
  196.     UInt8                            resFlag;                    /* 45 -->   Must be set to 0  */
  197.     PPCPortPtr                        portName;                    /* 46 -->   Destination portName */
  198.     LocationNamePtr                    locationName;                /* 50 -->   NBP or NAS style service location name */
  199.     unsigned long                    rejectInfo;                    /* 54 <--   reason for rejecting the session request */
  200.     unsigned long                    userData;                    /* 58 -->   Copied to destination PPCInform parameter block */
  201.     unsigned long                    userRefNum;                    /* 62 -->   userRefNum (obtained during login process)  */
  202. };
  203. typedef struct PPCStartPBRec PPCStartPBRec, *PPCStartPBPtr;
  204.  
  205. struct PPCAcceptPBRec {
  206.     Ptr                                qLink;
  207.     unsigned short                    csCode;
  208.     unsigned short                    intUse;
  209.     Ptr                                intUsePtr;
  210.     PPCCompUPP                        ioCompletion;
  211.     OSErr                            ioResult;
  212.     unsigned long                    Reserved[5];
  213.     short                            filler1;
  214.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  215. };
  216. typedef struct PPCAcceptPBRec PPCAcceptPBRec, *PPCAcceptPBPtr;
  217.  
  218. struct PPCRejectPBRec {
  219.     Ptr                                qLink;
  220.     unsigned short                    csCode;
  221.     unsigned short                    intUse;
  222.     Ptr                                intUsePtr;
  223.     PPCCompUPP                        ioCompletion;
  224.     OSErr                            ioResult;
  225.     unsigned long                    Reserved[5];
  226.     short                            filler1;
  227.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  228.     short                            filler2;
  229.     long                            filler3;
  230.     long                            filler4;
  231.     unsigned long                    rejectInfo;                    /* 54 -->   reason for rejecting the session request  */
  232. };
  233. typedef struct PPCRejectPBRec PPCRejectPBRec, *PPCRejectPBPtr;
  234.  
  235. struct PPCWritePBRec {
  236.     Ptr                                qLink;
  237.     unsigned short                    csCode;
  238.     unsigned short                    intUse;
  239.     Ptr                                intUsePtr;
  240.     PPCCompUPP                        ioCompletion;
  241.     OSErr                            ioResult;
  242.     unsigned long                    Reserved[5];
  243.     short                            filler1;
  244.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  245.     Size                            bufferLength;                /* 44 -->   Length of the message buffer */
  246.     Size                            actualLength;                /* 48 <--   Actual Length Written */
  247.     Ptr                                bufferPtr;                    /* 52 -->   Pointer to message buffer */
  248.     Boolean                            more;                        /* 56 -->   if more data in this block will be written */
  249.     unsigned char                    filler2;
  250.     unsigned long                    userData;                    /* 58 -->   Message block userData Uninterpreted by PPC */
  251.     OSType                            blockCreator;                /* 62 -->   Message block creator Uninterpreted by PPC */
  252.     OSType                            blockType;                    /* 66 -->   Message block type Uninterpreted by PPC */
  253. };
  254. typedef struct PPCWritePBRec PPCWritePBRec, *PPCWritePBPtr;
  255.  
  256. struct PPCReadPBRec {
  257.     Ptr                                qLink;
  258.     unsigned short                    csCode;
  259.     unsigned short                    intUse;
  260.     Ptr                                intUsePtr;
  261.     PPCCompUPP                        ioCompletion;
  262.     OSErr                            ioResult;
  263.     unsigned long                    Reserved[5];
  264.     short                            filler1;
  265.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  266.     Size                            bufferLength;                /* 44 -->   Length of the message buffer */
  267.     Size                            actualLength;                /* 48 <--   Actual length read */
  268.     Ptr                                bufferPtr;                    /* 52 -->   Pointer to message buffer */
  269.     Boolean                            more;                        /* 56 <--   if true more data in this block to be read */
  270.     unsigned char                    filler2;
  271.     unsigned long                    userData;                    /* 58 <--   Message block userData Uninterpreted by PPC */
  272.     OSType                            blockCreator;                /* 62 <--   Message block creator Uninterpreted by PPC */
  273.     OSType                            blockType;                    /* 66 <--   Message block type Uninterpreted by PPC */
  274. };
  275. typedef struct PPCReadPBRec PPCReadPBRec, *PPCReadPBPtr;
  276.  
  277. struct PPCEndPBRec {
  278.     Ptr                                qLink;
  279.     unsigned short                    csCode;
  280.     unsigned short                    intUse;
  281.     Ptr                                intUsePtr;
  282.     PPCCompUPP                        ioCompletion;
  283.     OSErr                            ioResult;
  284.     unsigned long                    Reserved[5];
  285.     short                            filler1;
  286.     PPCSessRefNum                    sessRefNum;                    /* 40 -->   Session Reference */
  287. };
  288. typedef struct PPCEndPBRec PPCEndPBRec, *PPCEndPBPtr;
  289.  
  290. struct PPCClosePBRec {
  291.     Ptr                                qLink;
  292.     unsigned short                    csCode;
  293.     unsigned short                    intUse;
  294.     Ptr                                intUsePtr;
  295.     PPCCompUPP                        ioCompletion;
  296.     OSErr                            ioResult;
  297.     unsigned long                    Reserved[5];
  298.     PPCPortRefNum                    portRefNum;                    /* 38 -->   Port Identifier */
  299. };
  300. typedef struct PPCClosePBRec PPCClosePBRec, *PPCClosePBPtr;
  301.  
  302. struct IPCListPortsPBRec {
  303.     Ptr                                qLink;
  304.     unsigned short                    csCode;
  305.     unsigned short                    intUse;
  306.     Ptr                                intUsePtr;
  307.     PPCCompUPP                        ioCompletion;
  308.     OSErr                            ioResult;
  309.     unsigned long                    Reserved[5];
  310.     short                            filler1;
  311.     unsigned short                    startIndex;                    /* 40 -->   Start Index */
  312.     unsigned short                    requestCount;                /* 42 -->   Number of entries to be returned */
  313.     unsigned short                    actualCount;                /* 44 <--   Actual Number of entries to be returned */
  314.     PPCPortPtr                        portName;                    /* 46 -->   PortName Match */
  315.     LocationNamePtr                    locationName;                /* 50 -->   NBP or NAS type name to locate the Port Location */
  316.     PortInfoArrayPtr                bufferPtr;                    /* 54 -->   Pointer to a buffer requestCount*sizeof(PortInfo) bytes big */
  317. };
  318. typedef struct IPCListPortsPBRec IPCListPortsPBRec, *IPCListPortsPBPtr;
  319.  
  320. union PPCParamBlockRec {
  321.     PPCOpenPBRec                    openParam;
  322.     PPCInformPBRec                    informParam;
  323.     PPCStartPBRec                    startParam;
  324.     PPCAcceptPBRec                    acceptParam;
  325.     PPCRejectPBRec                    rejectParam;
  326.     PPCWritePBRec                    writeParam;
  327.     PPCReadPBRec                    readParam;
  328.     PPCEndPBRec                        endParam;
  329.     PPCClosePBRec                    closeParam;
  330.     IPCListPortsPBRec                listPortsParam;
  331. };
  332.  
  333. #if !GENERATINGCFM
  334. #pragma parameter __D0 PPCInit
  335. #endif
  336. extern pascal OSErr PPCInit(void)
  337.  TWOWORDINLINE(0x7000, 0xA0DD);
  338. #define PPCOpen(pb, async) ((async) ? PPCOpenAsync(pb) : PPCOpenSync(pb))
  339.  
  340. #if !GENERATINGCFM
  341. #pragma parameter __D0 PPCOpenSync(__A0)
  342. #endif
  343. extern pascal OSErr PPCOpenSync(PPCOpenPBPtr pb)
  344.  TWOWORDINLINE(0x7001, 0xA0DD);
  345.  
  346. #if !GENERATINGCFM
  347. #pragma parameter __D0 PPCOpenAsync(__A0)
  348. #endif
  349. extern pascal OSErr PPCOpenAsync(PPCOpenPBPtr pb)
  350.  TWOWORDINLINE(0x7001, 0xA4DD);
  351. #define PPCInform(pb, async) ((async) ? PPCInformAsync(pb) : PPCInformSync(pb))
  352.  
  353. #if !GENERATINGCFM
  354. #pragma parameter __D0 PPCInformSync(__A0)
  355. #endif
  356. extern pascal OSErr PPCInformSync(PPCInformPBPtr pb)
  357.  TWOWORDINLINE(0x7003, 0xA0DD);
  358.  
  359. #if !GENERATINGCFM
  360. #pragma parameter __D0 PPCInformAsync(__A0)
  361. #endif
  362. extern pascal OSErr PPCInformAsync(PPCInformPBPtr pb)
  363.  TWOWORDINLINE(0x7003, 0xA4DD);
  364. #define PPCStart(pb, async) ((async) ? PPCStartAsync(pb) : PPCStartSync(pb))
  365.  
  366. #if !GENERATINGCFM
  367. #pragma parameter __D0 PPCStartSync(__A0)
  368. #endif
  369. extern pascal OSErr PPCStartSync(PPCStartPBPtr pb)
  370.  TWOWORDINLINE(0x7002, 0xA0DD);
  371.  
  372. #if !GENERATINGCFM
  373. #pragma parameter __D0 PPCStartAsync(__A0)
  374. #endif
  375. extern pascal OSErr PPCStartAsync(PPCStartPBPtr pb)
  376.  TWOWORDINLINE(0x7002, 0xA4DD);
  377. #define PPCAccept(pb, async) ((async) ? PPCAcceptAsync(pb) : PPCAcceptSync(pb))
  378.  
  379. #if !GENERATINGCFM
  380. #pragma parameter __D0 PPCAcceptSync(__A0)
  381. #endif
  382. extern pascal OSErr PPCAcceptSync(PPCAcceptPBPtr pb)
  383.  TWOWORDINLINE(0x7004, 0xA0DD);
  384.  
  385. #if !GENERATINGCFM
  386. #pragma parameter __D0 PPCAcceptAsync(__A0)
  387. #endif
  388. extern pascal OSErr PPCAcceptAsync(PPCAcceptPBPtr pb)
  389.  TWOWORDINLINE(0x7004, 0xA4DD);
  390. #define PPCReject(pb, async) ((async) ? PPCRejectAsync(pb) : PPCRejectSync(pb))
  391.  
  392. #if !GENERATINGCFM
  393. #pragma parameter __D0 PPCRejectSync(__A0)
  394. #endif
  395. extern pascal OSErr PPCRejectSync(PPCRejectPBPtr pb)
  396.  TWOWORDINLINE(0x7005, 0xA0DD);
  397.  
  398. #if !GENERATINGCFM
  399. #pragma parameter __D0 PPCRejectAsync(__A0)
  400. #endif
  401. extern pascal OSErr PPCRejectAsync(PPCRejectPBPtr pb)
  402.  TWOWORDINLINE(0x7005, 0xA4DD);
  403. #define PPCWrite(pb, async) ((async) ? PPCWriteAsync(pb) : PPCWriteSync(pb))
  404.  
  405. #if !GENERATINGCFM
  406. #pragma parameter __D0 PPCWriteSync(__A0)
  407. #endif
  408. extern pascal OSErr PPCWriteSync(PPCWritePBPtr pb)
  409.  TWOWORDINLINE(0x7006, 0xA0DD);
  410.  
  411. #if !GENERATINGCFM
  412. #pragma parameter __D0 PPCWriteAsync(__A0)
  413. #endif
  414. extern pascal OSErr PPCWriteAsync(PPCWritePBPtr pb)
  415.  TWOWORDINLINE(0x7006, 0xA4DD);
  416. #define PPCRead(pb, async) ((async) ? PPCReadAsync(pb) : PPCReadSync(pb))
  417.  
  418. #if !GENERATINGCFM
  419. #pragma parameter __D0 PPCReadSync(__A0)
  420. #endif
  421. extern pascal OSErr PPCReadSync(PPCReadPBPtr pb)
  422.  TWOWORDINLINE(0x7007, 0xA0DD);
  423.  
  424. #if !GENERATINGCFM
  425. #pragma parameter __D0 PPCReadAsync(__A0)
  426. #endif
  427. extern pascal OSErr PPCReadAsync(PPCReadPBPtr pb)
  428.  TWOWORDINLINE(0x7007, 0xA4DD);
  429. #define PPCEnd(pb, async) ((async) ? PPCEndAsync(pb) : PPCEndSync(pb))
  430.  
  431. #if !GENERATINGCFM
  432. #pragma parameter __D0 PPCEndSync(__A0)
  433. #endif
  434. extern pascal OSErr PPCEndSync(PPCEndPBPtr pb)
  435.  TWOWORDINLINE(0x7008, 0xA0DD);
  436.  
  437. #if !GENERATINGCFM
  438. #pragma parameter __D0 PPCEndAsync(__A0)
  439. #endif
  440. extern pascal OSErr PPCEndAsync(PPCEndPBPtr pb)
  441.  TWOWORDINLINE(0x7008, 0xA4DD);
  442. #define PPCClose(pb, async) ((async) ? PPCCloseAsync(pb) : PPCCloseSync(pb))
  443.  
  444. #if !GENERATINGCFM
  445. #pragma parameter __D0 PPCCloseSync(__A0)
  446. #endif
  447. extern pascal OSErr PPCCloseSync(PPCClosePBPtr pb)
  448.  TWOWORDINLINE(0x7009, 0xA0DD);
  449.  
  450. #if !GENERATINGCFM
  451. #pragma parameter __D0 PPCCloseAsync(__A0)
  452. #endif
  453. extern pascal OSErr PPCCloseAsync(PPCClosePBPtr pb)
  454.  TWOWORDINLINE(0x7009, 0xA4DD);
  455. #define IPCListPorts(pb, async) ((async) ? IPCListPortsAsync(pb) : IPCListPortsSync(pb))
  456.  
  457. #if !GENERATINGCFM
  458. #pragma parameter __D0 IPCListPortsSync(__A0)
  459. #endif
  460. extern pascal OSErr IPCListPortsSync(IPCListPortsPBPtr pb)
  461.  TWOWORDINLINE(0x700A, 0xA0DD);
  462.  
  463. #if !GENERATINGCFM
  464. #pragma parameter __D0 IPCListPortsAsync(__A0)
  465. #endif
  466. extern pascal OSErr IPCListPortsAsync(IPCListPortsPBPtr pb)
  467.  TWOWORDINLINE(0x700A, 0xA4DD);
  468. extern pascal OSErr DeleteUserIdentity(unsigned long userRef);
  469. extern pascal OSErr GetDefaultUser(unsigned long *userRef, Str32 userName);
  470. extern pascal OSErr StartSecureSession(PPCStartPBPtr pb, Str32 userName, Boolean useDefault, Boolean allowGuest, Boolean *guestSelected, ConstStr255Param prompt);
  471. typedef pascal Boolean (*PPCFilterProcPtr)(LocationNamePtr name, PortInfoPtr port);
  472.  
  473. #if GENERATINGCFM
  474. typedef UniversalProcPtr PPCFilterUPP;
  475. #else
  476. typedef PPCFilterProcPtr PPCFilterUPP;
  477. #endif
  478.  
  479. enum {
  480.     uppPPCCompProcInfo = kPascalStackBased
  481.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(PPCParamBlockPtr))),
  482.     uppPPCFilterProcInfo = kPascalStackBased
  483.          | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
  484.          | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(LocationNamePtr)))
  485.          | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(PortInfoPtr)))
  486. };
  487.  
  488. #if GENERATINGCFM
  489. #define NewPPCCompProc(userRoutine)        \
  490.         (PPCCompUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCCompProcInfo, GetCurrentArchitecture())
  491. #define NewPPCFilterProc(userRoutine)        \
  492.         (PPCFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppPPCFilterProcInfo, GetCurrentArchitecture())
  493. #else
  494. #define NewPPCCompProc(userRoutine)        \
  495.         ((PPCCompUPP) (userRoutine))
  496. #define NewPPCFilterProc(userRoutine)        \
  497.         ((PPCFilterUPP) (userRoutine))
  498. #endif
  499.  
  500. #if GENERATINGCFM
  501. #define CallPPCCompProc(userRoutine, pb)        \
  502.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPPCCompProcInfo, (pb))
  503. #define CallPPCFilterProc(userRoutine, name, port)        \
  504.         CallUniversalProc((UniversalProcPtr)(userRoutine), uppPPCFilterProcInfo, (name), (port))
  505. #else
  506. #define CallPPCCompProc(userRoutine, pb)        \
  507.         (*(userRoutine))((pb))
  508. #define CallPPCFilterProc(userRoutine, name, port)        \
  509.         (*(userRoutine))((name), (port))
  510. #endif
  511.  
  512. extern pascal OSErr PPCBrowser(ConstStr255Param prompt, ConstStr255Param applListLabel, Boolean defaultSpecified, LocationNameRec *theLocation, PortInfoRec *thePortInfo, PPCFilterUPP portFilter, ConstStr32Param theLocNBPType)
  513.  THREEWORDINLINE(0x303C, 0x0D00, 0xA82B);
  514.  
  515. #if PRAGMA_IMPORT_SUPPORTED
  516. #pragma import off
  517. #endif
  518.  
  519. #if PRAGMA_ALIGN_SUPPORTED
  520. #pragma options align=reset
  521. #endif
  522.  
  523. #ifdef __cplusplus
  524. }
  525. #endif
  526.  
  527. #endif /* __PPCTOOLBOX__ */
  528.